package cn.samler.diandi.api.model.io.request.post;

import cn.samler.diandi.api.annotation.IsRole;
import cn.samler.diandi.api.model.io.request.pub.Point;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

@Data
public class Nearby {
    @IsRole
    private String role;

    @NotNull(message = "point must be not null")
    @Valid
    private Point position;

    @NotNull(message = "range must be not null")
    @Max(value = 10000, message = "最大范围是10000米")
    private Integer range;
}
